Skip to content

fix: Able to run 'open .command' file#10543

Open
Jackie-Tang wants to merge 1 commit intowarpdotdev:masterfrom
Jackie-Tang:Jackie-Tangfix/9213-open-command
Open

fix: Able to run 'open .command' file#10543
Jackie-Tang wants to merge 1 commit intowarpdotdev:masterfrom
Jackie-Tang:Jackie-Tangfix/9213-open-command

Conversation

@Jackie-Tang
Copy link
Copy Markdown

Description

Allow .command files to be executed directly via the open command, matching macOS default behavior. Previously, double-clicking or opening a .command file in Warp routed to the editor instead of executing it.

This change adds "command" to the list of extensions recognized by is_runnable_shell_script so executable .command files are properly run as shell scripts.

Linked Issue

Fixes #9213

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

Testing

Updated the existing unit tests in openable_file_type.rs and URI routing tests in uri_tests.rs to cover .command files alongside the other shell extensions (bash, zsh, fish, ksh). The new cases verify that an executable .command file is detected as a runnable shell script and routed to execution rather than the editor.

  • I have manually tested my changes locally with ./script/run

Screenshots / Videos

N/A — no UI changes.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 9, 2026

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: JackieTang.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 9, 2026

@Jackie-Tang

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label May 9, 2026
@Jackie-Tang Jackie-Tang mentioned this pull request May 9, 2026
4 tasks
oz-for-oss[bot]
oz-for-oss Bot previously requested changes May 9, 2026
Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR adds .command to the Unix runnable shell-script extension allowlist and extends the existing routing/unit tests so executable .command files route to execution instead of the editor.

Concerns

  • Manual testing evidence is missing for this user-perceivable file-opening behavior change. Repository guidance requires screenshots or a screen recording that show the behavior working end to end, or a justification for why that evidence cannot be provided.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@Jackie-Tang
Copy link
Copy Markdown
Author

Thanks for flagging. I've added a short screen recording under the
"Screenshots / Videos" section showing the end-to-end behavior:

  1. Create an executable launchPackager.command with a shebang and echo body.
  2. Before the fix: open launchPackager.command from Warp routes to the editor.
  3. After the fix: open launchPackager.command runs the script and prints its output
    in a new block, matching macOS default behavior.

Also updated the PR description checkbox for screenshots/video.
/oz-review

can not open:
https://github.com/user-attachments/assets/de529419-7944-40b4-b46f-640f0007be04

can open:
https://github.com/user-attachments/assets/2884b749-553a-4120-b920-0113ec9ef820

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 9, 2026

@Jackie-Tang

I'm re-reviewing this pull request in response to a review request.

You can view the conversation on Warp.

I reviewed this pull request and requested human review from: @seemeroland.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot dismissed their stale review May 9, 2026 07:13

Oz no longer requests changes for this pull request after the latest automated review.

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR extends Unix runnable shell script detection to include executable .command files and updates utility and URI-routing regression coverage.

Concerns

  • No correctness, security, or spec concerns found in the reviewed diff.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot requested a review from seemeroland May 9, 2026 07:13
@Jackie-Tang Jackie-Tang force-pushed the Jackie-Tangfix/9213-open-command branch from 4e0b0ee to 97adb9c Compare May 9, 2026 09:12
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 9, 2026

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @Jackie-Tang on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment @cla-bot check to trigger another check.

@Jackie-Tang
Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label May 9, 2026
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 9, 2026

The cla-bot has been summoned, and re-checked this pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error opening .command file

1 participant